package com.example.mrwang.commadapter;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

import java.util.ArrayList;
/**@deprecated 已完成*/
public class MainActivity extends Activity {
    private ListView mListView;
    private MyAdapterWithCommonViewHolder mAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mListView = (ListView) findViewById(R.id.lv_list);
        ArrayList<Family> strings = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            Family family = new Family();
            family.addr = "宝石园";
            strings.add(family);
        }

        mAdapter = new MyAdapterWithCommonViewHolder(this, strings);
        mListView.setAdapter(mAdapter);
    }
}
